package com.ruoyi.business.domain;

import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.core.annotation.Excel;
import com.ruoyi.common.core.web.domain.BaseEntity;

/**
 * 优惠券对象 coupon
 * 
 * @author zr
 * @date 2024-09-12
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
public class Coupon extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 主键id */
    private Long id;

    /** 优惠券发放者（0平台、1商家） */
    @Excel(name = "优惠券发放者", readConverterExp = "0=平台、1商家")
    private Integer source;

    /** 商家id （平台可以为null） */
    @Excel(name = "商家id ", readConverterExp = "平=台可以为null")
    private Long mId;

    /** 优惠券名称 */
    @Excel(name = "优惠券名称")
    private String name;

    /** 优惠券类型(满减券、折扣券) */
    @Excel(name = "优惠券类型(满减券、折扣券)")
    private String type;

    /** 折扣 */
    @Excel(name = "折扣")
    private Double discount;

    /** 触发金额 */
    @Excel(name = "触发金额")
    private Double triggerMoney;

    /** 优惠金额 */
    @Excel(name = "优惠金额")
    private Double preferentialMoney;

    /** 开始时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "开始时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date start;

    /** 结束时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "结束时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date end;

    /** 投放数量 */
    @Excel(name = "投放数量")
    private Integer num;

    /** 领取数量 */
    @Excel(name = "领取数量")
    private Integer size;

    /** 状态 */
    @Excel(name = "状态")
    private Long status;

    private String shopName;
    private Shop shop;
    private Long uId;
}
